package com.example.ribbon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author tgj
 * @Date 16:37 2021/5/3
 */
@RestController
@RequestMapping("test")
public class ConsumerController {

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("test")
    public String test(String value) {
        return restTemplate.getForObject("http://provide/test/test?value=" + value, String.class);
    }
}
